package com.itheima.wms.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.itheima.pinda.base.entity.Entity;
import com.itheima.pinda.base.entity.SuperEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import static com.baomidou.mybatisplus.annotation.SqlCondition.EQUAL;
import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 入库清单
 * </p>
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@SuperBuilder
@TableName("wms_receipt_list")
@ApiModel(value = "ReceiptList", description = "入库清单")
public class ReceiptListEntity extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 主记录id
     */
    @ApiModelProperty(value = "主记录id")
    @NotNull(message = "主记录id不能为空", groups = {Save.class})
    @TableField(value = "master_id")
    private Long masterId;
    /**
     * 货品id
     */
    @ApiModelProperty(value = "货品id")
    @NotNull(message = "货品id不能为空", groups = {Save.class})
    @TableField(value = "goods_id")
    private Long goodsId;
    /**
     * 货主id
     */
    @ApiModelProperty(value = "货主id")
    @NotNull(message = "货主id不能为空", groups = {Save.class})
    @TableField(value = "owner_id")
    private Long ownerId;
    /**
     * 仓库id
     */
    @ApiModelProperty(value = "仓库id")
    @NotNull(message = "仓库id不能为空", groups = {Save.class})
    @TableField(value = "warehouse_id")
    private Long warehouseId;
    /**
     * 推荐库区id
     */
    @ApiModelProperty(value = "推荐库区id")
    @NotNull(message = "推荐库区id不能为空", groups = {Save.class})
    @TableField(value = "recommend_area_id")
    private Long recommendAreaId;
    /**
     * 推荐库位id
     */
    @ApiModelProperty(value = "推荐库位方案id")
    @NotNull(message = "推荐库位id不能为空", groups = {Save.class})
    @TableField(value = "recommend_location_plan_id")
    private Long recommendLocationPlanId;
    /**
     * 库区id
     */
    @ApiModelProperty(value = "库区id")
    @TableField(value = "area_id")
    private Long areaId;
    /**
     * 库位id
     */
    @ApiModelProperty(value = "库位方案id")
    @TableField(value = "location_plan_id")
    private Long locationPlanId;
    /**
     * 预计到货数
     */
    @ApiModelProperty(value = "预计到货数")
    @TableField(value = "plan_num")
    private Integer planNum;
    /**
     * 实收货数
     */
    @ApiModelProperty(value = "实收货数")
    @TableField(value = "real_num")
    private Integer realNum;
    /**
     * 实收数量差异
     */
    @ApiModelProperty(value = "实收数量差异")
    @TableField(value = "real_difference_num")
    private Integer realDifferenceNum;
    /**
     * 上架数量
     */
    @ApiModelProperty(value = "上架数量")
    @TableField(value = "grounding_num")
    private Integer groundingNum;
    /**
     * 上架数量差异
     */
    @ApiModelProperty(value = "上架数量差异")
    @TableField(value = "grounding_difference_num")
    private Integer groundingDifferenceNum;
    /**
     * 状态
     */
    @ApiModelProperty(value = "状态")
    @TableField(value = "status")
    private Integer status;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Length(max = 255, message = "备注长度不能超过255")
    @TableField(value = "remark")
    private String remark;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @Length(max = 50, message = "创建人长度不能超过50")
    @TableField(value = "create_name", fill = FieldFill.INSERT)
    private String createName;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    @Length(max = 50, message = "更新人长度不能超过50")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE)
    private String updateName;
    /**
     * 逻辑删除 0 删除
     */
    @ApiModelProperty(value = "逻辑删除 0 删除")
    @TableField(value = "logic_del")
    private Integer logicDel;
}
